﻿using System;
using System.IO;
using System.Net.DnsToolkit.Serializer;

namespace System.Net.DnsToolkit.Packet.Lazy {
    public class HeaderReader : IHeaderReader<IBufferReader> {

        public IHeader Read(IBufferReader source) {
            Header header = new Header(source);
            return header;
        }

        public bool TryRead(IBufferReader source, out IHeader header) {
            Header h = new Header(source);
            header = h;
            return true;
        }


    }
}
